<template>
	<view class="h100v">
		<custom-swiper @changePage="changePage" ref="swiper" :list="tabs" :bold="true">
			<template slot="swiper-item-1" class="h100">
				<!-- 数据总览 -->
				<Overview @changeCurrent="changeCurrent" />
			</template>
			<template slot="swiper-item-2" class="h100">
				<!-- 订单概况 -->
				<Order />
			</template>
			<template slot="swiper-item-3" class="h100">
				<!-- 支付概况 -->
				<Pay />
			</template>
			<template slot="swiper-item-4" class="h100">
				<!-- 商品概况 -->
				<Commodity />
			</template>
			<template slot="swiper-item-5" class="h100">
				<PayFace />
			</template>
		</custom-swiper>
	</view>
</template>

<script>
	import CustomSwiper from '@/components/custom-tabs-page-linkge/tab-page-linkage.vue';
	import Overview from './components/Overview.vue';
	import Order from './components/Order.vue';
	import Pay from './components/Pay.vue';
	import Commodity from './components/Commodity.vue';
	import PayFace from './components/PayFace.vue';
	export default {
		components: {
			CustomSwiper,
			Overview,
			Order,
			Pay,
			Commodity,
			PayFace
		},
		data(){
			return{
				tList:[
					{name: '外卖概况',type:1},{name: '店内概况',type:2}
				],
				tabs: [
					{id:1,name:'数据总览'},
					{id:1,name:'订单概况'},
					// {id:1,name:'支付概况'},
					// {id:1,name:'商品概况'},
					// {id:1,name:'当面付'},
					],
				updataId:'',
				oldIndex:0,
				tList: [
					{
						name: '堂食订单'
					},
					{
						name: '快餐订单'
					}
				]
			}
		},
		mounted() {
			// console.log(this.$refs.swiper)
		},
		methods:{
			changeCurrent(e){
				this.$refs.swiper.changeCurrent(e)
			},
			changePage(index){
				this.oldIndex = index
				this.updataId = this.tabs[index].id
			}
		}
	}
</script>

<style scoped lang="scss">
</style>
